<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>OCILIB (C and C++ Driver for Oracle): ocilib::ThreadKey Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">OCILIB (C and C++ Driver for Oracle)
   &#160;<span id="projectnumber">4.2.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>About</span></a></li>
      <li><a href="modules.html"><span>Documentation</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classocilib_1_1_thread_key.html','');});
</script>
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="classocilib_1_1_thread_key-members.html">List of all members</a> &#124;
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">ocilib::ThreadKey Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Static class allowing to set/get thread local storage (TLS) values for a given unique key.  
 <a href="classocilib_1_1_thread_key.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="ocilib_8hpp_source.html">ocilib.hpp</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a5a365c670cbce2beec5c85c6f5012860"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5a365c670cbce2beec5c85c6f5012860"></a>
typedef <a class="el" href="group___ocilib_c_api_datatypes.html#gad82d734ef2ba8d4e24874e3d6a6faa26">POCI_THREADKEYDEST</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_thread_key.html#a5a365c670cbce2beec5c85c6f5012860">ThreadKeyFreeProc</a></td></tr>
<tr class="memdesc:a5a365c670cbce2beec5c85c6f5012860"><td class="mdescLeft">&#160;</td><td class="mdescRight"><a class="el" href="classocilib_1_1_thread.html" title="static class allowing to manipulate threads ">Thread</a> Key callback for freeing resources. <br /></td></tr>
<tr class="separator:a5a365c670cbce2beec5c85c6f5012860"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:ae075e1b66354c71e317c6a68c17985e3"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_thread_key.html#ae075e1b66354c71e317c6a68c17985e3">Create</a> (const <a class="el" href="namespaceocilib.html#a01daa07e307e429b66fb80f442362237">ostring</a> &amp;name, <a class="el" href="classocilib_1_1_thread_key.html#a5a365c670cbce2beec5c85c6f5012860">ThreadKeyFreeProc</a> freeProc=0)</td></tr>
<tr class="memdesc:ae075e1b66354c71e317c6a68c17985e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a thread key object.  <a href="#ae075e1b66354c71e317c6a68c17985e3">More...</a><br /></td></tr>
<tr class="separator:ae075e1b66354c71e317c6a68c17985e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7899df68a1e710315cc79500c418db6b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_thread_key.html#a7899df68a1e710315cc79500c418db6b">SetValue</a> (const <a class="el" href="namespaceocilib.html#a01daa07e307e429b66fb80f442362237">ostring</a> &amp;name, <a class="el" href="namespaceocilib.html#aaad26690e8171c4564d66776987e1bd2">AnyPointer</a> value)</td></tr>
<tr class="memdesc:a7899df68a1e710315cc79500c418db6b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a thread key value.  <a href="#a7899df68a1e710315cc79500c418db6b">More...</a><br /></td></tr>
<tr class="separator:a7899df68a1e710315cc79500c418db6b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad93fb8aef7bbafefe288abeaadec91c7"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespaceocilib.html#aaad26690e8171c4564d66776987e1bd2">AnyPointer</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classocilib_1_1_thread_key.html#ad93fb8aef7bbafefe288abeaadec91c7">GetValue</a> (const <a class="el" href="namespaceocilib.html#a01daa07e307e429b66fb80f442362237">ostring</a> &amp;name)</td></tr>
<tr class="memdesc:ad93fb8aef7bbafefe288abeaadec91c7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a thread key value.  <a href="#ad93fb8aef7bbafefe288abeaadec91c7">More...</a><br /></td></tr>
<tr class="separator:ad93fb8aef7bbafefe288abeaadec91c7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Static class allowing to set/get thread local storage (TLS) values for a given unique key. </p>
<p>This class wraps the OCILIB object handle OCI_ThreadKey and its related methods</p>
<dl class="section note"><dt>Note</dt><dd>See <a class="el" href="group___ocilib_c_api_threading.html">Threads and mutexes</a> for more details on Oracle multi-threading support </dd></dl>

<p>Definition at line <a class="el" href="ocilib_8hpp_source.html#l01376">1376</a> of file <a class="el" href="ocilib_8hpp_source.html">ocilib.hpp</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="ae075e1b66354c71e317c6a68c17985e3"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ocilib::ThreadKey::Create </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceocilib.html#a01daa07e307e429b66fb80f442362237">ostring</a> &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classocilib_1_1_thread_key.html#a5a365c670cbce2beec5c85c6f5012860">ThreadKeyFreeProc</a>&#160;</td>
          <td class="paramname"><em>freeProc</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Create a thread key object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>- <a class="el" href="classocilib_1_1_thread.html" title="static class allowing to manipulate threads ">Thread</a> key name </td></tr>
    <tr><td class="paramname">freeProc</td><td>- <a class="el" href="classocilib_1_1_thread.html" title="static class allowing to manipulate threads ">Thread</a> key value destructor function</td></tr>
  </table>
  </dd>
</dl>
<dl class="section note"><dt>Note</dt><dd>Parameter freeProc is optional. It's called when the thread terminates to allow the program to deal with the thread specific value of the key </dd></dl>

<p>Definition at line <a class="el" href="ocilib__impl_8hpp_source.html#l01220">1220</a> of file <a class="el" href="ocilib__impl_8hpp_source.html">ocilib_impl.hpp</a>.</p>

<p>References <a class="el" href="namespaceocilib.html#ada9a964035fd103d4ec07500f404a658">ocilib::Check()</a>, and <a class="el" href="group___ocilib_c_api_threading.html#gaec7011dada56cbab7bba9eec43632d86">OCI_ThreadKeyCreate()</a>.</p>

</div>
</div>
<a class="anchor" id="a7899df68a1e710315cc79500c418db6b"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void ocilib::ThreadKey::SetValue </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceocilib.html#a01daa07e307e429b66fb80f442362237">ostring</a> &amp;&#160;</td>
          <td class="paramname"><em>name</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespaceocilib.html#aaad26690e8171c4564d66776987e1bd2">AnyPointer</a>&#160;</td>
          <td class="paramname"><em>value</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Set a thread key value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>- <a class="el" href="classocilib_1_1_thread.html" title="static class allowing to manipulate threads ">Thread</a> key name </td></tr>
    <tr><td class="paramname">value</td><td>- user value to set </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="ocilib__impl_8hpp_source.html#l01225">1225</a> of file <a class="el" href="ocilib__impl_8hpp_source.html">ocilib_impl.hpp</a>.</p>

<p>References <a class="el" href="namespaceocilib.html#ada9a964035fd103d4ec07500f404a658">ocilib::Check()</a>, and <a class="el" href="group___ocilib_c_api_threading.html#ga627db7548da4a3d749f64253ae968d9c">OCI_ThreadKeySetValue()</a>.</p>

</div>
</div>
<a class="anchor" id="ad93fb8aef7bbafefe288abeaadec91c7"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="namespaceocilib.html#aaad26690e8171c4564d66776987e1bd2">AnyPointer</a> ocilib::ThreadKey::GetValue </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespaceocilib.html#a01daa07e307e429b66fb80f442362237">ostring</a> &amp;&#160;</td>
          <td class="paramname"><em>name</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Get a thread key value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">name</td><td>- <a class="el" href="classocilib_1_1_thread.html" title="static class allowing to manipulate threads ">Thread</a> key name</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="classocilib_1_1_thread.html" title="static class allowing to manipulate threads ">Thread</a> key value on success otherwise FALSE </dd></dl>

<p>Definition at line <a class="el" href="ocilib__impl_8hpp_source.html#l01230">1230</a> of file <a class="el" href="ocilib__impl_8hpp_source.html">ocilib_impl.hpp</a>.</p>

<p>References <a class="el" href="namespaceocilib.html#ada9a964035fd103d4ec07500f404a658">ocilib::Check()</a>, and <a class="el" href="group___ocilib_c_api_threading.html#gad31beffff5fa23c1af211e4a7d33fee7">OCI_ThreadKeyGetValue()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceocilib.html">ocilib</a></li><li class="navelem"><a class="el" href="classocilib_1_1_thread_key.html">ThreadKey</a></li>
    <li class="footer">Generated on Mon Mar 21 2016 22:26:39 for OCILIB (C and C++ Driver for Oracle) by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
  </ul>
</div>
</body>
</html>
